﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" EnableViewState="false" %>
<!DOCTYPE html>
<html>
<head>
    <title>商家网站首页</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"
        charset="utf-8" />
    <link href="jquery.mobile-1.3.2.css" rel="stylesheet"
        type="text/css" />
    <%--<link href="jquery.mobile-1.3.2.css" rel="stylesheet" type="text/css" />--%>
    <link href="mobiscroll.custom-2.5.0.min.css" rel="stylesheet" type="text/css" />
    <script src="jquery-1.11.2.min.js" type="text/javascript"></script>
    <%--<script src="jquery-1.11.2.min.js" type="text/javascript"></script>--%>
    <script src="jquery.mobile-1.3.2.js" type="text/javascript"></script>
    <%--<script src="jquery.mobile-1.3.2.js" type="text/javascript"></script>--%>
    <link href="Micro-Website.css" rel="stylesheet" type="text/css" />
    <script src="Micro-Website.js" type="text/javascript"></script>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    <link href="photoswipe.css" rel="stylesheet" type="text/css" />
    <script src="klass.min.js" type="text/javascript"></script>
    <script src="code.photoswipe-3.0.5.min.js" type="text/javascript"></script>
    <script src="mobiscroll.custom-2.5.0.min.js" type="text/javascript"></script>
    <script src="xxl.base.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {

            if ("<%=memID %>" == "0") {
                if (document.location.href.indexOf("#") > -1) {
                    document.location.href = "index.aspx";
                }
                delCookie("uid");
                $("a[data-load]").each(function (event) {
                    Verification(this);
                })
            } else {

            }
        })



        $(function () {
            pushHistory();
            var bool = false;
            setTimeout(function () {
                bool = true;
            }, 100);
            window.addEventListener("popstate", function (e) {
                if (bool) {

                    location.href = 'index.aspx';
                }
                pushHistory();

            }, false);
        });
        function pushHistory() {
            var state = {
                title: "title",
                url: "#"
            };
            window.history.pushState(state, "title", "#");
        }


        function Withdrawals(moeny) {

            if (Number(moeny)) {
                if (window.confirm('你确定要进行提现吗？(零钱：' + Number(moeny) + ')')) {
                    $.ajax({

                        url: "../Service/AjaxService.ashx?Method=Withdrawals",
                        data: {
                            memid: '<%=memID%>',

                              },
                              cache: false,
                              dataType: "TEXT",
                              success: function (ret) {
                                  if (ret == "1") {
                                      alert("提现成功");
                                  } else {
                                      alert("提现失败");
                                  }
                              }



                          })
                          return true;
                      } else {

                          return false;
                      }

                  } else {
                      alert("没有零钱");
                  }

              }


              var imgUrl = "<%=Domain %>/Upload/WeiXin/Images/memCard.jpg";
        //        var lineLink = "<%=Domain %>/ReceptionPage/register.aspx?referrer=<%=memID %>";

        var lineLink = "<%=lineLinkurl %>";

        var descContent = "我已经申请了<%=WeiXinShopName %>的会员卡,你也来申请吧,有送积分哦!";
        var shareTitle = "我已经申请了<%=WeiXinShopName %>的会员卡,你也来申请吧,有送积分哦!";
        var appid = "<%=WeiXinAppID %>";

        function shareFriend() {
            WeixinJSBridge.invoke('sendAppMessage', {
                "appid": appid,
                "img_url": imgUrl,
                "img_width": "200",
                "img_height": "200",
                "link": lineLink,
                "desc": descContent,
                "title": shareTitle
            }, function (res) {
                //_report('send_msg', res.err_msg);
            })
        }
        function shareTimeline() {
            WeixinJSBridge.invoke('shareTimeline', {
                "img_url": imgUrl,
                "img_width": "200",
                "img_height": "200",
                "link": lineLink,
                "desc": descContent,
                "title": shareTitle
            }, function (res) {
                //_report('timeline', res.err_msg);
            });
        }
        function shareWeibo() {
            WeixinJSBridge.invoke('shareWeibo', {
                "content": descContent,
                "url": lineLink
            }, function (res) {
                //_report('weibo', res.err_msg);
            });
        }
        // 当微信内置浏览器完成内部初始化后会触发WeixinJSBridgeReady事件。
        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
            // 发送给好友
            WeixinJSBridge.on('menu:share:appmessage', function (argv) {
                shareFriend();
            });
            // 分享到朋友圈
            WeixinJSBridge.on('menu:share:timeline', function (argv) {
                shareTimeline();
            });
            // 分享到微博
            WeixinJSBridge.on('menu:share:weibo', function (argv) {
                shareWeibo();
            });
        }, false);

        function onBridgeReady() {
            WeixinJSBridge.call('hideToolbar');
        }

        if (typeof WeixinJSBridge == "undefined") {
            if (document.addEventListener) {
                document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
            } else if (document.attachEvent) {
                document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
                document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
            }
        } else {
            onBridgeReady();
        }
    </script>


</head>
<body>
    <!--商家网站首页-->
    <section data-role="page" id="index">
        <div id="index_content">


            <!--
            <div class="divLeft">
                <div class="div-bottom"><a href="#aboutbusiness" data-load="aboutbusiness.aspx"><img src="/Upload/MicroWebsite/MicroWebsiteIndex/about-Business.jpg?vi=<%=r.Next(10000, 99999) %>" /></a></div>
                <div class="div-bottom"><a href="#promotions" data-load="promotions.aspx"><img src="/Upload/MicroWebsite/MicroWebsiteIndex/promotions.jpg?vi=<%=r.Next(10000, 99999) %>" /></a></div>
                <div><a href="#opinion" data-load="opinion.aspx"><img src="/Upload/MicroWebsite/MicroWebsiteIndex/opinion.jpg?vi=<%=r.Next(10000, 99999) %>"/></a></div>
            </div>
            <div class="divRight">
                <div class="div-bottom"><a href="#productcenter" data-load="productcenter.aspx"><img src="/Upload/MicroWebsite/MicroWebsiteIndex/product-Center.jpg?vi=<%=r.Next(10000, 99999) %>" /></a></div>
                <div class="div-bottom"><a href="#storeinquiry" data-load="storeinquiry.aspx"><img src="/Upload/MicroWebsite/MicroWebsiteIndex/store-Inquiry.jpg?vi=<%=r.Next(10000, 99999) %>"/></a></div>
                <div><a href="#imagedisplay" data-load="imagedisplay.aspx"><img src="/Upload/MicroWebsite/MicroWebsiteIndex/image-Display.jpg?vi=<%=r.Next(10000, 99999) %>"/></a></div>
            </div>
            -->


       

            <div class="ui-grid-a index_title_list">
                <div class="ui-block-a">
                    <a href="#aboutbusiness" data-load="aboutbusiness.aspx" style="background:#8c34ef;"><img src="images/b01.png" /></a>
                </div>
                <div class="ui-block-b">
                    <a href="#productcenter" data-load="productcenter.aspx" style="background:#ef445c;"><img src="images/b02.png" /></a>
                </div>

                <div class="ui-block-a">
                    <a href="#promotions" data-load="promotions.aspx" style="background:#f90;"><img src="images/b03.png" /></a>
                </div>
                <div class="ui-block-b">
                    <a href="#storeinquiry" data-load="storeinquiry.aspx" style="background:#18cdd6;"><img src="images/b04.png" /></a>
                </div>

                <div class="ui-block-a">
                    <a href="#opinion" data-load="opinion.aspx" style="background:#09f;"><img src="images/b05.png" /></a>
                </div>
                <div class="ui-block-b">
                    <a href="#imagedisplay" data-load="imagedisplay.aspx" style="background:#1ac167;"><img src="images/b06.png" /></a>
                </div>
            </div>


        </div>
        
        <input type="hidden" runat="server" id="txtMemID" />

        <footer data-role="footer" data-position="fixed" id="index_footer">
            <div data-role="navbar" id="nav-glyphish-example">
                <ul>
                    <li class="footer_active"><a href="#index" id="site" class="ui-btn-active">
                            <img src="images/01.png" /><br/>商家网站
                        </a></li>
                    <li><a href="#goodlist"id="buy" data-load="goodlist.aspx">
                            <img src="images/Goods_Book_btn.png" /><br/>商品购买
                        </a></li>
                    <li><a href="#membershipcard" data-load="membershipcard.aspx"  id="card">
                            <img src="images/member_card_btn.png" /><br/>会员卡
                        </a></li>
                    <li><a href="#giftlist" data-load="giftlist.aspx" id="convert">
                            <img src="images/exchange_btn.png" /><br/>积分兑换
                        </a></li>
                </ul>
            </div>
        </footer>
    </section>
    <!--关于商家-->
    <section data-role="page" id="aboutbusiness"></section>
    <!--优惠活动-->
    <section data-role="page" id="promotions"></section>
    <!--意见建议-->
    <section data-role="page" id="opinion"></section>
    <!--产品中心-->
    <section data-role="page" id="productcenter"></section>
    <!--产品详情-->
    <section data-role="page" id="productdetail"></section>
    <!--门店查询-->
    <section data-role="page" id="storeinquiry"></section>
    <!--分享中心-->
    <section data-role="page" id="imagedisplay"></section>

        <!--会员活动记录-->
    <section data-role="page" id="ActivityLog"></section>

    
    <section data-role="page" id="imagedisplaybol"></section>
  
    <!--会员卡-->
    <section data-role="page" id="membershipcard"></section>
    <!--会员说明-->
    <section data-role="page" id="memberexplanation"></section>
    <!--优惠券-->
    <section data-role="page" id="coupon"></section>
    <!--完善个人资料-->
    <section data-role="page" id="personalinfo"></section>
    <!--历史记录主页-->
    <section data-role="page" id="historymain"></section>
    <!--兑换记录-->
    <section data-role="page" id="historyconvertgift"></section>
    <!--积分记录-->
    <section data-role="page" id="historyexchangepoint"></section>
     <!--分享页面-->
    <section data-role="page" id="share"></section>
        <!--零钱记录-->
    <section data-role="page" id="SmallChangeLog"></section>
    <!--充值记录-->
    <section data-role="page" id="historyrecharge"></section>
    <!--消费记录-->
    <section data-role="page" id="historyexpense"></section>
    <!--商品列表-->
    <section data-role="page" id="goodlist"></section>
    <!--商品详情-->
    <section data-role="page" id="gooddetail"></section>
    <!--商品车-->
    <section data-role="page" id="goodscard"></section>
    <!--商品订单-->
    <section data-role="page" id="goodorders"></section>
    <!--商品订单-->
    <section data-role="page" id="goodspay"></section>
    <!--礼品列表-->
    <section data-role="page" id="giftlist"></section>
    <!--礼品详情-->
    <section data-role="page" id="giftdetail"></section>
    <!--礼品车-->
    <section data-role="page" id="giftscard"></section>
    <!--礼品订单-->
    <section data-role="page" id="giftorders"></section>
    <!--查看个人信息-->
    <section data-role="page" id="lookpersonalinfo"></section>
    <!--门店消费记录-->
    <section data-role="page" id="historyexpenseByStores"></section>
    <!--门店消费记录详情-->
    <section data-role="page" id="historyexpenseByStoresDetail"></section>
    <!--门店兑换记录-->
    <section data-role="page" id="historyconvertgiftByStores"></section>
    <!--门店兑换记录详情-->
    <section data-role="page" id="historyconvertgiftByStoresDetail"></section>
    <!--登录页面-->
    <section data-role="page" id="login"></section>
    <!--微信注册-->
    <section data-role="page" id="register"></section>
    <!--修改密码-->
    <section data-role="page" id="changepsw"></section>
</body>
</html>


